/**
 * Copyright (c) 2018-2028, kongcloud@foxmail.com.
 * <p>
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.gnu.org/licenses/lgpl.html
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kongcloud.core.constant;


/**
 * 系统常量
 *
 * @author 
 */
public interface AppConstant {

    static final String URL_SEPARATOR = "/";
    static final String GATEWAY_REGISTER_URI = "/config/registerCenterList";
    static final String GATEWAY_METRIC_INIT_DATA_URI = "/config/metricInit";
    static final String GATEWAY_MASTER_STATUS_URI = "/config/materStatus";
    static final String GATEWAY_STL_STATUS_URI = "/config/getGatewayStl";

    static final String GATEWAY_SEND_MSG_URI = "/config/sendLaunchCode";
    static final String GATEWAY_NOTICE_DONG_LIST_URI = "/config/getDongList";
    static final String GATEWAY_NOTICE_MOBILE_LIST_URI = "/config/getMobileList";

    static final String SEND_MESSAGE_URI = "/message/gate/push";
    static final String GATEWAY_ADMIN_INTER_PROXY_URI_PREFIX = "/inter-proxy";
    static final String APP_HEALTH_URI = "/actuator/health";

    static final String APPLICATION_NAME_SEPARATOR = "-";

    static final String APPLICATION_ROOT_USER_NAME = "kongcloud";
    
    //1677469086466L
    //1768903068000L
    static final Long APPLICATION_NUMBER = 1768903068000L;
    //sec
    static final long GW_CONFIG_CACHE_NUMBER = (3600 * 24 * 365 * 3)/2L;

    String ENV_KONG_CLOUD_GW_SYS_STL_STATUS_KEY = "kongcloud.env.gw.system.status";
    //seconds
    String REDIS_KONG_CLOUD_GW_SYS_STL_KEY = "kongcloud:gw:sys:stl";
    String CONST_KONG_CLOUD_GW_SYS_STL_MAGIC_VALE = "20230616";

    //TTL SECONDS
    static final long GW_STL_NUMBER = (3600 * 24 * 365 * 4)/2L;

    /**
     * 应用名前缀
     */
    static final String APPLICATION_NAME_PREFIX = "kongcloud-";

    /**
     * 应用版本
     */
    String APPLICATION_NAME_KEY = "APPLICATION_NAME_KEY_";

    /**
     * 应用版本
     */
    String REGISTER_SERVER_SEPARATOR = ",";

    /**
     * 应用版本
     */
    String REGISTER_SERVER_LIST_PROP = "kongcloud.register.server.list";


    /**
     * 应用版本
     */
    String APPLICATION_VERSION = "3.1.1_RC-OGA";

    /**
     * 基础包
     */
    String BASE_PACKAGES = "org.kongcloud";

    String CACHE_BASE_BIND_USER_KEY_PREFIX = "org:kongcloud:bind:user:";
    String CACHE_USER_ACC_PASS_KEY_PREFIX = "org:kongcloud:init:user:pass:";
    String CACHE_USER_ACC_SETS_KEY_PREFIX = "org:kongcloud:user:sets:";

    String KONGCLOUD_ENV_KEY = "kongcloud.env";
    String KONGCLOUD_ENV_KEY_FAKE = "kongcloud.env.fake";
    String KONGCLOUD_GW_MASTER_STATUS = "kongcloud.env.gw.master.status";
    String KONGCLOUD_GW_MASTER_DOMAIN = "kongcloud.env.gw.master.domain";
    String KONGCLOUD_GW_DOMAIN = "kongcloud.env.this.gw.domain";

    String KONGCLOUD_CUSTOMIZED_CONSUL = "kongcloud.customized.consul";
    String KONGCLOUD_CUSTOMIZED_CONSUL_CHECK = "kongcloud.customized.consul.check";
    String KONGCLOUD_CUSTOMIZED_NACOS_CHECK = "kongcloud.customized.nacos.check";

    Long HOT_APP_ALARM_LIMIT = 1200000L;
    Long HOT_APP_METRICS_LIMIT = 1000000L;
    //1048576
    Long HOT_APP_KEEP_METRICS_SEC_HOLDER = 3600L * 24 * 365 * 2000;
    Long TR_ACC_SEC_HOLDER = 3600L * 24 * 7;
    String KONGCLOUD_TMP_DIR = "user.env.temp.dir";

    /**
     * 网关模块名称
     */
    String APPLICATION_GATEWAY_NAME = APPLICATION_NAME_PREFIX + "gateway";
    /**
     * 授权模块名称
     */
    String APPLICATION_AUTH_NAME = APPLICATION_NAME_PREFIX + "auth";
    /**
     * 监控模块名称
     */
    String APPLICATION_ADMIN_NAME = APPLICATION_NAME_PREFIX + "admin";
    /**
     * 首页模块名称
     */
    String APPLICATION_DESK_NAME = APPLICATION_NAME_PREFIX + "desk";
    /**
     * 系统模块名称
     */
    String APPLICATION_SYSTEM_NAME = APPLICATION_NAME_PREFIX + "system";
    /**
     * 用户模块名称
     */
    String APPLICATION_USER_NAME = APPLICATION_NAME_PREFIX + "user";
    /**
     * 日志模块名称
     */
    String APPLICATION_LOG_NAME = APPLICATION_NAME_PREFIX + "log";
    /**
     * 开发模块名称
     */
    String APPLICATION_DEVELOP_NAME = APPLICATION_NAME_PREFIX + "develop";
    /**
     * 资源模块名称
     */
    String APPLICATION_RESOURCE_NAME = APPLICATION_NAME_PREFIX + "resource";
    /**
     * 链路追踪模块名称
     */
    String APPLICATION_ZIPKIN_NAME = APPLICATION_NAME_PREFIX + "zipkin";
    /**
     * 报表系统名称
     */
    String APPLICATION_REPORT_NAME = APPLICATION_NAME_PREFIX + "report";
    /**
     * 测试模块名称
     */
    String APPLICATION_TEST_NAME = APPLICATION_NAME_PREFIX + "test";

    /**
     * demo模块名称
     */
    String APPLICATION_DEMO_NAME = APPLICATION_NAME_PREFIX + "demo";

    String JAVA_TMP_DIR = "java.io.tmpdir";
    String DEV_IP = "127.0.0.1";
    /**
     * 开发环境
     */
    String DEV_CODE = "dev";

    /**
     * 预发环境
     */
    String PRE_CODE = "pre";

    /**
     * 预发环境
     */
    String PRE_PREFIX_CODE = "pre-";
    /**
     * 生产环境
     */
    String PROD_CODE = "prod";

    /**
     * 生产环境
     */
    String PROD_PREFIX_CODE = "prod-";

    /**
     * 生产环境
     */
    String PROD_GGJ_CODE = "prod-ol";

    static final String APPLICATION_ROOT_USER_PASS = "PASSWORD";
    /**
     * 生产环境
     */
    String QA_CODE = "qa";
    /**
     * 测试环境
     */
    String TEST_CODE = "test";

    /**
     * 代码部署于 linux 上，工作默认为 mac 和 Windows
     */
    String OS_NAME_LINUX = "LINUX";

}
